From 3482c7ac5ecfa6b9a86a8cf34719f1e1c5b2ebc4 Mon Sep 17 00:00:00 2001 From: Tim Deegan Date: Tue, 20 Feb 2007 20:02:49 +0000 Subject: [PATCH] [HVM] Fix MMIO LODS emulation Signed-off-by: Tim Deegan --- xen/arch/x86/hvm/io.c | 1 + xen/arch/x86/hvm/platform.c | 1 + 2 files changed, 2 insertions(+) diff --git a/xen/arch/x86/hvm/io.c b/xen/arch/x86/hvm/io.c index 30a80a4f27..e2e8e35afe 100644 --- a/xen/arch/x86/hvm/io.c +++ b/xen/arch/x86/hvm/io.c @@ -533,6 +533,7 @@ static void hvm_mmio_assist(struct cpu_user_regs *regs, ioreq_t *p, break; case INSTR_LODS: + set_reg_value(size, 0, 0, regs, p->data); sign = p->df ? -1 : 1; regs->esi += sign * p->count * p->size; if (mmio_opp->flags & REPZ) diff --git a/xen/arch/x86/hvm/platform.c b/xen/arch/x86/hvm/platform.c index 268729567c..9ba8c3e4a3 100644 --- a/xen/arch/x86/hvm/platform.c +++ b/xen/arch/x86/hvm/platform.c @@ -1136,6 +1136,7 @@ void handle_mmio(unsigned long gpa) * Since the source is always in (contiguous) mmio space we don't * need to break it up into pages. */ + mmio_op->operand[0] = mk_operand(op_size, 0, 0, REGISTER); send_mmio_req(IOREQ_TYPE_COPY, gpa, GET_REPEAT_COUNT(), op_size, 0, IOREQ_READ, df, 0); break; -- 2.30.2